<style lang="less">
    .abc{
        padding:0 20px;
    }
</style>

<template>
    <div>
        <rollpad title="幸运老虎机" :value="value" :numbers="numbers" class="abc"></rollpad>
    </div>
</template>

<script type="text/babel">
    import rollpad from './rollpad';
    var vm = null;

    export default {
        data:()=>({
                    value:0,
                    numbers:0
                }),
        components:{rollpad},
        ready:function(){
            vm = this;
            this.numbers = 10;
            this.value = 0;
            function pw(i,j){
                return i*Math.pow(10,j||0);
            }
            setTimeout(function(){
                vm.value = Math.floor(Math.random()*pw(8,6))*100 + pw(6,8);
                setInterval(function(){
                    vm.value += Math.floor(Math.random()*pw(10,Math.floor(Math.random()*9)))
                },2500);

            },1000);
        }
    }



</script>